package ace.module.product.core.impl.dao.entity;

import jakarta.annotation.Nullable;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.GenericPageContent;
import ace.module.product.api.model.dto.PmsProductBrowseRecordDto;

/**
* 商品浏览记录.
*
* @author Caspar
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = PmsProductBrowseRecordDto.TABLE_DESC)
@Table(PmsProductBrowseRecordDto.TABLE_NAME)
public class PmsProductBrowseRecord implements Serializable, GenericPageContent<Long> {

  @Id
  @Schema(title = PmsProductBrowseRecordDto.ID_TITLE, description = PmsProductBrowseRecordDto.ID_DESC)
  private Long id;

  @Schema(title = PmsProductBrowseRecordDto.PMS_APP_ID_TITLE, description = PmsProductBrowseRecordDto.PMS_APP_ID_DESC)
  private Long pmsAppId;

  @Schema(title = PmsProductBrowseRecordDto.SHOP_ID_TITLE, description = PmsProductBrowseRecordDto.SHOP_ID_DESC)
  private Long shopId;

  @Schema(title = PmsProductBrowseRecordDto.PRODUCT_ID_TITLE, description = PmsProductBrowseRecordDto.PRODUCT_ID_DESC)
  private Long productId;

  @Schema(title = PmsProductBrowseRecordDto.PRODUCT_SKU_ID_TITLE, description = PmsProductBrowseRecordDto.PRODUCT_SKU_ID_DESC)
  private Long productSkuId;

  /**
   * {@link ace.module.product.api.enums.PmsProductBrowseRecordTypeEnum}
   */
  @Schema(title = PmsProductBrowseRecordDto.TYPE_TITLE, description = PmsProductBrowseRecordDto.TYPE_DESC)
  private Integer type;

  @Schema(title = PmsProductBrowseRecordDto.ACCOUNT_ID_TITLE, description = PmsProductBrowseRecordDto.ACCOUNT_ID_DESC)
  private Long accountId;

  @Size(max = 255)
  @Schema(title = PmsProductBrowseRecordDto.NAME_TITLE, description = PmsProductBrowseRecordDto.NAME_DESC)
  private String name;

  @Schema(title = PmsProductBrowseRecordDto.IMAGE_TITLE, description = PmsProductBrowseRecordDto.IMAGE_DESC)
  private String image;

  @Schema(title = PmsProductBrowseRecordDto.RECORD_TITLE, description = PmsProductBrowseRecordDto.RECORD_DESC)
  private String record;

  @LogicDelete
  @Schema(title = PmsProductBrowseRecordDto.DELETE_FLAG_TITLE, description = PmsProductBrowseRecordDto.DELETE_FLAG_DESC)
  private Long deleteFlag;

  @CreatedDate
  @Schema(title = PmsProductBrowseRecordDto.CREATE_TIME_TITLE, description = PmsProductBrowseRecordDto.CREATE_TIME_DESC)
  private Long createTime;

  @LastModifiedDate
  @Schema(title = PmsProductBrowseRecordDto.UPDATE_TIME_TITLE, description = PmsProductBrowseRecordDto.UPDATE_TIME_DESC)
  private Long updateTime;

  @Version
  @Schema(title = PmsProductBrowseRecordDto.ROW_VERSION_TITLE, description = PmsProductBrowseRecordDto.ROW_VERSION_DESC)
  private Long rowVersion;

}
